/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package assisisw.smartcal.entitysubsystem;

import assisisw.smartcal.entitysubsystem.exceptions.user.UserAlreadyRegisteredException;
import assisisw.smartcal.entitysubsystem.exceptions.user.UserNotRegisteredException;
import java.io.Serializable;
import javax.ejb.Local;

/**
 *
 * @author Francesco
 */
@Local
public interface IUserController extends Serializable
{

    /**
     * @param eMail 
     * @return
     */
    public boolean isRegistered ( String eMail ) ;
    
     /**
     * @param eMail
     * @param password
     * @param firstName
     * @param lastName
     * @param token the value of token
     * @throws UserAlreadyRegisteredException
     */
    public void registerUser ( String eMail , String password , String firstName , String lastName , String token ) 
            throws UserAlreadyRegisteredException ;
    
    /**
     * @param eMail
     * @return
     * @throws IllegalArgumentException
     * @throws UserNotRegisteredException
     */
    public User getUser ( String eMail ) throws UserNotRegisteredException;
    
    /**
     * @param u
     * @throws IllegalArgumentException
     */
    public void activate ( User u ) ;

    /**
     * @param u
     * @throws IllegalArgumentException
     */
    public void deactivate ( User u ) ;

    /**
     * @param u
     */
    public void update ( User u ) ;
    
}
